<div class="clubs">
	<div class="row club-header">
		<div class="col-xs-6">
			<a ng-click="showAllTopics()" class="tab-topic {{showTopics?'active':''}}">所有话题</a>
		</div>
		<div class="col-xs-6">
			<a ng-click="showAllClubs()" class="tab-club {{showClubs?'active':''}}">所有社区</a>
		</div>
	</div>
	<div class="row" ng-if="showClubs || showSearchResult">
		<div class="clubs-container">
			<form name="searchForm" ng-submit="submitSearch(this.searchOption)">
				<input name="searchInput" type="search" placeholder="搜索社区" ng-model="searchOption"/>
			</form>
		</div>
	</div>
	<div class="clubs" ng-if="showClubs">
		<div class="row normal-clubs" ng-if="myClubs.length">
			<div class="col-xs-6" ng-repeat="club in myClubs">
				<a ng-click="gotoClub(club.snsClubId)" class="btn btn-club">
				<span class="club-name">{{club.name}}</span> 
				<span class="topic-amount">{{club.topicCount}}</span>
				</a>
			</div>
		</div>
		
		<div class="row recommended-clubs">
			<h3>推荐社区</h3>
			<div class="col-xs-6 club-item" ng-repeat="club in recommendedClubs">
				
				<a class="club-icon" ng-click="gotoClub(club.snsClubId)"><img ng-src="{{club.icon}}"></a> 
				<div class="club-info">
				<a ng-click="gotoClub(club.snsClubId)">{{club.name}}</a>
				<p>话题 {{club.topicCount}}</p>
				</div>
			</div>
		</div>
		
		<div class="row rank-clubs">
			<h3>社区排行</h3>
			<div class="col-xs-6 club-item" ng-repeat="club in rankClubs">
				
				<a class="club-icon" ng-click="gotoClub(club.snsClubId)"><img ng-src="{{club.icon}}"></a> 
				<div class="club-info">
				<a ng-click="gotoClub(club.snsClubId)">{{club.name}}</a> 
				<p>话题 {{club.topicCount}}</p>
				</div>
			</div>
		</div>
	</div>
	
	<div ng-if="showTopics" pullable-view topics="topics">
		<div class="refresh-icon" style="height:{{refreshHeight}}px;">
			<i class="fa fa-circle-o-notch fa-spin"></i> 放开手指刷新
		</div>
		<div class="topics-container">
			
			<mc-topic-list newpage="true" topics="topics" mctopic-Mode="mctopicMode"></mc-topic-list>
			<div ng-show="showMore" class="load-more">
				<span ng-if="isTapping && !noMorePage">放开手指，加载更多话题</span>
				<span ng-if="isTapping && noMorePage">已经是最后一页了</span>
				<span ng-if="isLoading && !isTapping"><i class="fa fa-circle-o-notch"></i>正在加载更多话题。。。</span>
			</div>
			<div class="btn-more" ng-show="!hasTouch">显示更多</div>
		</div>
	</div>

	</div>
	
	<div class="search-result" ng-if="showSearchResult">
		
		<div class="row search-result-content">
			<div ng-if="findClubs">搜索结果，共{{searchResult.length}}条</div>
			<div ng-if="!findClubs">
				无符合条件结果
			</div>
			<div ng-if="findClubs">
				<div class="col-md-6 club-item" ng-repeat="club in searchResult">
					<a class="club-icon" ng-click="gotoClub(club.snsClubId)"><img ng-src="{{club.icon}}"></a> 
					<div class="club-info">
					<a ng-click="gotoClub(club.snsClubId)">{{club.name}}</a> 
					<p>话题 {{club.topicCount}}</p>
					</div>
				</div>
			</div>
		</div>
	</div>

</div>

